[XENFB] xenfb_update_screen() calls zap_page_range() while holding spinlock mm_lock.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Fri, 15 Dec 2006 17:29:25 +0000 (17:29 +0000)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Fri, 15 Dec 2006 17:29:25 +0000 (17:29 +0000)
commit6465003372a365ef73f1ae48090a3b14c7a9813b
tree932bd85619fbff6132b9bc05d532627dc3e6e057
parent658acbc0e62337f31599e5932f44f2a1c8a89f82
[XENFB] xenfb_update_screen() calls zap_page_range() while holding spinlock mm_lock.

Changeset 13018:c98ca86138a7422cdf9b15d87c95619b7277bb6a merely sweeps
the bug under the carpet: it silences zap_page_range()'s cries for
help by keeping interrupts enabled.  That doesn't fix the bug, and
it's also wrong: if a critical region gets interrupted, and the
interrupt printk()s, xenfb_refresh() gets executed and promptly
deadlocks.

This patch fixes the locking, but leaves open a race between
xenfb_update_screen() and do_no_page().  See the source code for a
detailed explanation of how it works, and where it fails.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
linux-2.6-xen-sparse/drivers/xen/fbfront/xenfb.c